home *** CD-ROM | disk | FTP | other *** search
- property pSpr, pLastLine, pMember
- global gLastAlphabetMode, gMode, gLastAlphabetLetter, gLastLetter
-
- on beginSprite me
- pSpr = sprite(me.spriteNum)
- pMember = pSpr.member
- if inRecipeMode() then
- pSpr.member.color = black()
- end if
- pLastLine = VOID
- mRefresh(me, max(1, gLastLetter))
- end
-
- on mRefresh me, X
- if paused() then
- exit
- end if
- if not isText(pSpr) then
- exit
- end if
- if (gLastLetter = gLastAlphabetLetter) and (gLastAlphabetMode = gMode) then
- if inGameMode() then
- exit
- end if
- end if
- gLastAlphabetMode = gMode
- if not voidp(X) then
- gLastLetter = X
- end if
- if voidp(gLastLetter) then
- setIt(me, 1)
- end if
- gLastAlphabetLetter = gLastLetter
- baseText = buildRecipeList(member("alphabet").text.char[gLastLetter])
- if inRecipeMode() then
- addText = EMPTY
- else
- addText = "Click the blue Recipes tab above to immediately view the customer's recipes currently on order." & RETURN & RETURN
- end if
- pMember.text = addText & baseText
- pMember.text = pMember.text
- if pMember.type = #text then
- colorize(pMember, redDot(), red(), 1)
- colorize(pMember, blueDot(), blue())
- pMember.Tabs = [[#type: #left, #position: 18], [#type: #left, #position: 30], [#type: #left, #position: 72]]
- pMember.scrollTop = 0
- end if
- if charPosToLoc(pMember, length(pMember.text)).locV > pSpr.rect.height then
- pMember.boxType = #scroll
- else
- pMember.boxType = #fixed
- end if
- if baseText = "No Matching Recipes" then
- return 0
- else
- return 1
- end if
- end
-
- on mouseWithin me
- if paused() then
- exit
- end if
- if not inRecipeMode() then
- exit
- end if
- if not isText(pSpr) then
- exit
- end if
- thisLine = PointToLine(pSpr, the mouseLoc)
- if thisLine = pLastLine then
- exit
- end if
- if thisLine > 0 then
- if not voidp(pLastLine) and (pLastLine > 0) then
- pSpr.member.line[pLastLine].color = black()
- end if
- pLastLine = thisLine
- pSpr.member.line[thisLine].color = red()
- end if
- end
-
- on mouseEnter me
- if inRecipeMode() then
- pSpr.member.color = black()
- end if
- end
-
- on mouseLeave
- if inRecipeMode() then
- pSpr.member.color = black()
- end if
- end
-
- on mouseDown me
- global gLastCurrent, gLastQuickView
- if paused() then
- exit
- end if
- if not inRecipeMode() then
- go("Other")
- exit
- end if
- if voidp(pLastLine) then
- pLastLine = PointToLine(pSpr, the mouseLoc)
- if voidp(pLastLine) then
- pLastLine = 1
- end if
- end if
- RECID = findRecipeByName(pSpr.member.line[pLastLine], 2)
- if RECID then
- reply = checkForSpecialRecipe(RECID, 1)
- if reply <> #help then
- if gLastQuickView then
- goToLabel("quickView")
- else
- gLastCurrent = 2
- goToLabel("Current2")
- end if
- end if
- updateStage()
- manualRecipeChoice(RECID)
- end if
- end
-